#include<bits/stdc++.h>

using namespace std;
const int maxn = 1000 + 10;
int S[maxn],top = -1;//简单栈的模拟
int size(){
    return top+1;
}
void init() {
    top = -1;
}

void push(int x) {
    S[++top] = x;
}
void pop(){
    --top;
}
int peek(){
    return S[top];
}

int main() {
    init();
    for (int i = 0; i < 10; i++) {
        push(i);
    }
    while (size() > 0) {
        cout << peek();
        pop();
    }
    return 0;
}